#ifndef unigame_UniGame_h
#define unigame_UniGame_h

#include "transform/Transform.h"
#include "math/Math.h"
#include "time/TimeInclude.h"
#include "debug/Debug.h"
#include "object/ObjectInclude.h"
#include "common/Common.h"
#include "scene/SceneInclude.h"
#include "tools/Tools.h"
#include "platform/PlatformInclude.h"
#include "config/Def.h"
#include "render/Render.h"
#include "component/ComponentInclude.h"
#include "lua/LuaManager.h"

namespace unigame
{
	class UniGame
	{
	public:
		~UniGame();

		void update();

		void paint();

		Render* render()
		{
			return m_render;
		}

		Time* time()
		{
			return m_time;
		}
        
        Timer* timer()
        {
            return m_timer;
        }

		Stage* stage()
		{
			return m_stage;
		}
        
        Device* device()
        {
            return m_device;
        }

		void start();

		static UniGame* instance();
		static void destroy();
        
	private:
		UniGame();

	private:
		Time* m_time;
        Timer* m_timer;
		Stage* m_stage;
        Device* m_device;
		Input* m_input;
		Render* m_render;
		LuaManager* m_lua;

		static UniGame* s_instance;
	};
}
#endif